package org.mitoma.logger.client;

import org.mitoma.logger.shared.AuthInfo;
import org.mitoma.logger.shared.AuthenticationException;
import org.mitoma.logger.shared.RegistrationException;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

/**
 * The client side stub for the RPC service.
 */
@RemoteServiceRelativePath("logger")
public interface LoggerService extends RemoteService {

  void preRegister(String email, String password)
      throws AuthenticationException, RegistrationException;

  AuthInfo register(String userId) throws AuthenticationException,
      RegistrationException;

  AuthInfo login(String email, String password) throws AuthenticationException;

  AuthInfo isLoggedIn() throws AuthenticationException;

}
